<?php
namespace Admin\Model;
use Think\Model;
class AdvertModel extends Model
{
	protected $fields = array('id','name','icon','iurl','status');
	protected $pk = 'id';
	protected $_validate = array(
		array ('name','','广告名称已存在',2,'unique',1),
		array ('name','require','广告名称不能为空'),
		array ('icon','require','广告图片不能为空'),
		array('iurl','/\b(([\w-]+:\/\/?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/)))/','地址不符合',2,'regex'),

		);
}